|
Repetier-Firmware
1.0.0
|
Handle distortion related stuff. More...
#include <Distortion.h>
Public Member Functions | |
| Distortion () | |
| void | init () |
| void | enable (bool permanent=true) |
| void | disable (bool permanent=true) |
| bool | measure (void) |
| int32_t | correct (int32_t x, int32_t y, int32_t z) const |
| Compute distortion correction at given position. More... | |
| void | updateDerived () |
| void | reportStatus () |
| bool | isEnabled () |
| int32_t | zMaxSteps () |
| void | set (float x, float y, float z) |
| void | showMatrix () |
| void | resetCorrection () |
Private Member Functions | |
| int | matrixIndex (fast8_t x, fast8_t y) const |
| int32_t | getMatrix (int index) const |
| void | setMatrix (int32_t val, int index) |
| bool | isCorner (fast8_t i, fast8_t j) const |
| INLINE int32_t | extrapolatePoint (fast8_t x1, fast8_t y1, fast8_t x2, fast8_t y2) const |
| void | extrapolateCorner (fast8_t x, fast8_t y, fast8_t dx, fast8_t dy) |
| void | extrapolateCorners () |
Private Attributes | |
| int32_t | step |
| int32_t | radiusCorrectionSteps |
| int32_t | zStart |
| int32_t | zEnd |
| int32_t | matrix [DISTORTION_CORRECTION_POINTS *DISTORTION_CORRECTION_POINTS] |
| bool | enabled |
Handle distortion related stuff.
Distortion correction can be used to solve problems resulting from an uneven build plate. It allows measuring a nxn grid with a z-probe and add these correction to all moves. Normally you start at the bottom with 100% correction and at 0.5mm you start reducing correction until it vanishes completely at 1-3 mm.
The stored values are steps required to reach the bumped level assuming you are at zMin. So if you have a 1mm indentation it contains -steps per mm.
| Distortion::Distortion | ( | ) |
| int32_t Distortion::correct | ( | int32_t | x, |
| int32_t | y, | ||
| int32_t | z | ||
| ) | const |
Compute distortion correction at given position.
The current tool offset is added to the CNC position to reference the right distortion point.
| x | coordinate in CMC steps. |
| y | coordinate in CMC steps. |
| z | coordinate in CMC steps. |
| void Distortion::disable | ( | bool | permanent = true | ) |
| void Distortion::enable | ( | bool | permanent = true | ) |
|
private |
|
inlineprivate |
Extrapolates the changes from p1 to p2 to p3 which has the same distance as p1-p2.
|
private |
| void Distortion::init | ( | ) |
|
inline |
| bool Distortion::measure | ( | void | ) |
| void Distortion::reportStatus | ( | ) |
| void Distortion::resetCorrection | ( | void | ) |
| void Distortion::set | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
|
private |
| void Distortion::showMatrix | ( | ) |
| void Distortion::updateDerived | ( | ) |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |